package cn.byapps.service;

import java.util.List;

import org.springframework.web.multipart.MultipartFile;

import cn.byapps.entity.UploadFile;
import cn.byapps.entity.User;

public interface UserService {

	User login(String username,String password);

	User get(String token);

	User getParent(String token);

	User save(User user);

	User update(User user);

	Boolean delete(User user);

	User findByLoginName(String loginName);

	List<User> findAll();

	List<User> findByName(String username);

	boolean changePassword(User u, String pwd);

	void uploadFile(User u,String name,String title, MultipartFile myfile);

	UploadFile getFile(String id);

	void deleteFile(String id);

	boolean deleteByAdmin(User u);

	boolean startByAdmin(User u);

	User getById(Integer id);

	boolean checkUser(User parent, User me);
}
